<div class="module-setting">
    <ol class="breadcrumb">
        <li>运营系统</li>
        <li>好友邀请</li>
    </ol>
    <div class="ui-box">
        <div class="form-container">
            <div class="body-title">活动开关</div>
            <form class="form-inline ui-form"
                  role="form">
                <div class="row">
                    <div class="col-md-1">
                        <span class="text">当前状态</span>
                    </div>
                    <div class="col-md-1" ng-if="vm.activityInfo.status === 'ON'">
                        <span class="text">开启</span>
                    </div>
                    <div class="col-md-1" ng-if="vm.activityInfo.status === 'OFF'">
                        <span class="text">关闭</span>
                    </div>
                    <div class="col-md-9" ng-if="vm.activityInfo.status === 'ON'">
                        <a href="javascript:;"
                           class="btn btn-danger"
                           ng-click="vm.updateActivityStatus('OFF')">关闭</a>
                    </div>
                    <div class="col-md-9" ng-if="vm.activityInfo.status === 'OFF'">
                        <div class="col-md-9">
                            <a href="javascript:;"
                               class="btn btn-success"
                               ng-click="vm.updateActivityStatus('ON')">开启</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="ui-box">
        <div class="body-title">50元礼包配置</div>
        <form class="form-inline ui-form" role="form">
            <div class="form-group ui-input-select">
                <select class="form-control" ng-model="vm.registerRewardForm.assetCode">
                    <option value="">请选择币种</option>
                    <option value="{{item.value}}"
                            ng-repeat="item in $root.$coinList">{{item.label}}</option>
                </select>
                <input type="text"
                       class="form-control"
                       ng-model="vm.registerRewardForm.value"
                       style="width: 200px;"
                       placeholder="请输入数量">
                <button type="submit"
                        class="btn btn-primary"
                        ng-click="vm.updateConfig('INVITED', vm.registerRewardForm.assetCode, vm.registerRewardForm.value)">更新</button>
            </div>
        </form>

        <table class="table table-striped table-hover">
            <thead>
            <tr>
                <th width="30%">资产类型</th>
                <th width="30%">数量</th>
                <th width="40%">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="item in vm.registerRewardList"
                ng-if="vm.isLoading === false && vm.registerRewardList.length > 0 && item.status === 'ON'">
                <td>{{item.rewardAssetCode}}</td>
                <td>{{item.amount}}</td>
                <td>
                    <a href="javascript:;"
                       ng-click="vm.updateConfig('INVITED', item.rewardAssetCode, item.amount, 'OFF')">删除</a>
                </td>
            </tr>
            <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.registerRewardList.length === 0||vm.registerRewardList===null)">
                <td colspan="3">暂无数据</td>
            </tr>
            <tr class="ui-loading" ng-if="vm.isLoading === true">
                <td colspan="3">正在加载，请稍候...</td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="ui-box">
        <div class="body-title">单次推荐奖励配置</div>
        <form class="form-inline ui-form" role="form">
            <div class="form-group ui-input-select">
                <select class="form-control" ng-model="vm.inviteRewardForm.assetCode">
                    <option value="">请选择币种</option>
                    <option value="{{item.value}}"
                            ng-repeat="item in $root.$coinList">{{item.label}}</option>
                </select>
                <input type="text"
                       class="form-control"
                       ng-model="vm.inviteRewardForm.value"
                       style="width: 200px;"
                       placeholder="请输入数量">
                <button type="submit"
                        class="btn btn-primary"
                        ng-click="vm.updateConfig('INVITER', vm.inviteRewardForm.assetCode, vm.inviteRewardForm.value)">更新</button>
            </div>
        </form>

        <table class="table table-striped table-hover">
            <thead>
            <tr>
                <th width="30%">资产类型</th>
                <th width="30%">数量</th>
                <th width="40%">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="item in vm.inviteRewardList"
                ng-if="vm.isLoading === false && vm.inviteRewardList.length > 0 && item.status === 'ON'">
                <td>{{item.rewardAssetCode}}</td>
                <td>{{item.amount}}</td>
                <td>
                    <a href="javascript:;"
                       ng-click="vm.updateConfig('INVITER', item.rewardAssetCode, item.amount, 'OFF')">删除</a>
                </td>
            </tr>
            <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.inviteRewardList.length === 0||vm.inviteRewardList===null)">
                <td colspan="3">暂无数据</td>
            </tr>
            <tr class="ui-loading" ng-if="vm.isLoading === true">
                <td colspan="3">正在加载，请稍候...</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
